package com.neighbor.neighborhooduser.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.neighbor.neighborhooduser.pojo.Posts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 用户帖子表 Mapper 接口
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:13:04
 */
public interface IPostsDao extends BaseMapper<Posts> {

    IPage<Posts> getPostsWithUser(Page<Posts> pageQuery, Integer type, Integer status, Integer postId, String nickname, Integer isHot);

    Posts getPostWithUserById(Integer postId);

    List<Posts> getHotPosts(Integer offset, Integer pageSize);


    List<Posts> selectPostsWithUser(Integer page, Integer pageSize, Integer type, String title, String nickname);


}
